import java.awt.Color;
import java.awt.geom.Line2D;
import java.awt.geom.Path2D;
import java.awt.geom.Path2D.Double;
import java.awt.geom.Point2D;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;

/**
 * 
 * @author Adam and Terry
 * 
 */
public class Area {

	private static final long serialVersionUID = 741713763308816772L;
	private String name;
	private boolean changed;
	private String delimiter;
	private Color colour;
	private Color bgColour;
	private MapLabel nameInfo = new MapLabel();  
	private ArrayList<Point2D.Double> points;

	/**
	 * 
	 * @param name
	 * @param delimiter
	 */
	public Area(String name, String delimiter) {
		this.name = name;
		this.changed = false;
		this.delimiter = delimiter;
		this.colour = Color.black;
		this.bgColour = Color.white;
		points = new ArrayList<Point2D.Double>();
	}
	
	public void setRefPoint(Point2D.Double point)
	{
		this.nameInfo.refPoint = point;
	}
	
	public Color getBGColour()
	{
		return this.bgColour;
	}
	
	public void setBGColour(Color colour)
	{
		this.bgColour = colour;
	}
	
	public void setName(String name)
	{
		this.name = name;
	}

	public String getName() {
		return name;
	}
	
	public void setChanged(boolean changed)
	{
		this.changed = changed;
	}
	
	public boolean getChanged()
	{
		return this.changed;
	}
	
	 public MapLabel getLabel() {
	        return nameInfo;
	    }

	public ArrayList<Point2D.Double> getPoints() {
		return points;
	}
	
	
	
	/**
	 * 
	 * @return colour
	 */
	public Color getColour() {
		return this.colour;
	}

	public void addPoint(Point2D.Double pt) {
		points.add(pt);
	}
	
	public void addPoint(String name, Point2D.Double pt) {
		points.add(pt);
	}
}
